using System.Threading.Tasks;
using JlPay.Sdk.Core;
using JlPay.Sdk.Models.Trans.Common;

namespace JlPay.Sdk.Services.Trans.Common
{
    /// <summary>
    /// 预授权查询服务
    /// </summary>
    public class PreAuthQueryService : BaseService
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="config">配置对象</param>
        public PreAuthQueryService(Config config) : base(config)
        {
        }

        /// <summary>
        /// 预授权查询接口
        /// </summary>
        /// <param name="request">预授权查询请求</param>
        /// <returns>预授权查询响应</returns>
        public async Task<PreAuthQueryResponse> PreAuthQueryAsync(PreAuthQueryRequest request)
        {
            return await PostAsync<PreAuthQueryRequest, PreAuthQueryResponse>(request, PreAuthQueryRequest.API_URL);
        }
    }
} 